package com.greenline.pay.biz.manager.exception;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

public class PayException extends Exception {

	private static final long serialVersionUID = 1L;

	private int code = 0;

	private String message = "";

	public PayException(String message) {
		super();
		this.message = message;
	}

	public PayException(int errorCode, String message) {
		super();
		this.code = errorCode;
		this.message = message;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	@Override
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.SHORT_PREFIX_STYLE);
	}
}
